package com.workflow.dao;


import com.flowable.FlowProcDefDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 流程定义查询
 *
 * @author Tony
 * @email
 * @date 2022/1/29 5:44 下午
 **/
@Mapper
public interface FlowDeployMapper {

    /**
     * 流程定义列表
     * @param name
     * @return
     */
    @Select("SELECT\n" +
            "            rp.id_ as id,\n" +
            "            rp.deployment_id_ as deploymentId,\n" +
            "            rd.name_ as name,\n" +
            "            rd.category_ as category,\n" +
            "            rp.key_ as flowKey,\n" +
            "            rp.version_ as version,\n" +
            "            rp.suspension_state_ as suspensionState,\n" +
            "            rd.deploy_time_  as deploymentTime\n" +
            "        FROM\n" +
            "            act_re_procdef rp\n" +
            "                LEFT JOIN act_re_deployment rd ON rp.deployment_id_ = rd.id_")
    List<FlowProcDefDto> selectDeployList(String name);



}
